home *** CD-ROM | disk | FTP | other *** search
/ AP Professional Graphics CD-ROM Library / AP Professional Graphics CD-ROM Library.iso / pc / unix / appendix / gemsii / makefile < prev    next >
Encoding:
Makefile  |  1993-05-26  |  2.1 KB  |  91 lines

  1. # Makefile for Graphics Gems II source
  2. #
  3. # Eric Haines, 9/92
  4. #
  5. # This make file will build "gemslib2.a" and a number of executables.
  6. # Gemslib2 is built solely for debugging purposes -- it is not intended
  7. # to be used as a library.
  8. #
  9. # Note that some of the gems need additional macros, functions, tables
  10. # driving routines, etc. before they will compile or run properly.
  11. # These include:
  12. #
  13. # Hilbert assumes GL is available
  14. #
  15. # hot needs write_pixel and read_pixel routines
  16. #
  17. # ran_ramp needs fb_init, fb_setmap and fb_done routines
  18. #
  19. # VoxelCache needs RAY_REC, LIGHT_REC, TRIANGLE_REC, cache, object, and voxel
  20. #    structures.  Code is mostly for illustrative purposes.
  21. #
  22. # radiosity code needs a fleshed out draw.c function
  23.  
  24. #
  25. # C compiler flags
  26. #
  27. CFLAGS = -g
  28. #
  29. # Location of Graphics Gems library
  30. #
  31. LIBFILE = gemslib2.a
  32.  
  33. #
  34. # Graphics Gems II Vector Library
  35. #
  36. VECLIB = GGVecLib.o
  37.  
  38. MFLAGS = "LIBFILE = ../$(LIBFILE)" "GENCFLAGS = $(CFLAGS)"
  39.  
  40. SHELL = /bin/sh
  41.  
  42. OFILES = FastUpdate.o GGVecLib.o InterPhong.o RayCPhdron.o \
  43.     c_format.o hot.o inverse.o noise3.o quantizer.o \
  44.     ran_ramp.o rotate.o rotate8x8.o sparse.o unmatrix.o xlines.o \
  45.     Hilbert.o VoxelCache.o
  46.  
  47. DIRS =    BitCounting Peano RealPixels dither intersect inv_cmap radiosity \
  48.     viewcorr
  49.  
  50. ALL =    c_format quantizer xlines hot ran_ramp Hilbert $(LIBFILE)
  51.  
  52. all: $(ALL)
  53.     @for d in $(DIRS) ; do \
  54.         (cd $$d ; $(MAKE) $(MFLAGS)) ;\
  55.     done
  56.  
  57. $(LIBFILE): $(OFILES) $(VECLIB)
  58.     ar rcs $(LIBFILE) $(OFILES) $(VECLIB)
  59.  
  60. Hilbert: Hilbert.o
  61.     $(CC) $(CFLAGS) -o $@ Hilbert.o
  62.  
  63. c_format: c_format.o
  64.     $(CC) $(CFLAGS) -o $@ c_format.o
  65.  
  66. hot:    hot.o
  67.     $(CC) $(CFLAGS) -o $@ hot.o -lm
  68.  
  69. quantizer: quantizer.o
  70.     $(CC) $(CFLAGS) -o $@ quantizer.o
  71.  
  72. ran_ramp: ran_ramp.o
  73.     $(CC) $(CFLAGS) -o $@ ran_ramp.o
  74.  
  75. xlines: xlines.o
  76.     $(CC) $(CFLAGS) -o $@ xlines.o
  77.  
  78. clean:
  79.     @for d in $(DIRS) ; do \
  80.         (cd $$d ; $(MAKE) $(MFLAGS) clean) ;\
  81.     done
  82.     /bin/rm -f $(OFILES) $(VECLIB)
  83.     /bin/rm -f FastUpdate.o GGVecLib.o Hilbert.o InterPhong.o \
  84.         RayCPhdron.o VoxelCache.o c_format.o hot.o inverse.o noise3.o \
  85.         quantizer.o ran_ramp.o rotate.o rotate8x8.o sparse.o \
  86.         unmatrix.o xlines.o \
  87.         Hilbert c_format hot quantizer ran_ramp xlines \
  88.         a.out core $(LIBFILE)
  89.  
  90. $(ALL): GraphicsGems.h
  91.